import java.util.Comparator;

public class ComparatorTest implements Comparator<ComparatorTest>{
	private String s1;
	private String s2;

	public String getS1() {
		return s1;
	}

	public void setS1(String s1) {
		this.s1 = s1;
	}

	public String getS2() {
		return s2;
	}

	public void setS2(String s2) {
		this.s2 = s2;
	}

	@Override
	public String toString() {
		return "ComparableTest [s1=" + s1 + ", s2=" + s2 + "]";
	}

	@Override
	public int compare(ComparatorTest o1, ComparatorTest o2) {
		// TODO Auto-generated method stub
		if(o1.s1.equals(o2.s1)&&o1.s2.equals(o2.s2)) {
			return 0;
		} else if (o1.s1.compareTo(o2.s1)>0) {
			return 1;
		} else {
			return -1;
		}
		
		
		
	}

	

}
